


clear all	
cd "${data}"	
use "data2.dta", clear

keep if vague >2 & vague <8
	
xtset id vague

eststo m_accuracy_bes: xtreg accuracy_index i.wave_, fe vce(cluster id)
margins, at(wave_=(3 4 5 6 7)) 

marginsplot, ///
    title("") ///
    ytitle("predicted average perceptual error") ///
    xtitle("wave time") ///
    xlab(3/7, valuelabel labsize(small) angle(90) ///
         grid glpattern(solid) glcolor(gs14) glwidth(vthin)) ///
    xline(5.5, lpattern("-.") lcolor(black)) ///
    yscale(range(1.4 (0.2) 2)) ///
    ylabel(#4, labsize(small) ///
           grid glpattern(solid) glcolor(gs14) glwidth(vthin)) ///
    plot1opts(lcolor(gs12) mcolor(gs12)) ///
    ciopts(lcolor(gs12) lwidth(thin)) ///
    plotregion(lcolor(black) lwidth(thin) lpattern(solid))
graph save "${figures}/figure2.gph", replace
graph save "${figures}/figure2.png", replace




